<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../dist/style/css/pc_base.css">
    <script>

    </script>
</head>

<body>

    <header class="hd">
        <div class="warp">
            <ul class="btn-list">
                <li class="item">
                    <a href="#" class="shop-car bg">
                        <!--<div class="num">1</div>-->
                        <i class="icon iconfont icon-icon"></i>
                    </a>
                </li>
                <li class="item">
                    <a href="./register.html">
                        <i class="iconfont icon-wode"></i>请登录
                    </a>
                    <!--<span href="#" class="bg">
                        <i class="icon iconfont icon-wode"></i>18200398881
                    </span>
                    <ul class="child-item">
                            <li><a href="#">我的订单</a></li>
                            <li><a href="#">收货地址</a></li>
                            <li><a href="#">绑定银行卡</a></li>
                            <li><a href="#">退出商场</a></li>
                        </ul>-->
                </li>
            </ul>
            <a href="./">
                <img src="../dist/images/logo.png" alt="" class="logo-img">
                <span class="span_txt">商城首页</span>
            </a>

        </div>
    </header>



    <div class="shop_car_list">
        <div class="warp">
            <div class="p_tit">
                我的购物车(<span>5</span>件商品)
            </div>
            <div class="data-list">
                <div class="tab_warp">
                    <div class="tit">
                        <div class="td td_1">
                            <div class="icon-check">
                                <i class="iconfont icon-duoxuan"></i>
                            </div>
                            <span>全部</span>
                        </div>
                        <div class="td td_2">
                            商品信息
                        </div>
                        <div class="td td_3">&nbsp;</div>
                        <div class="td td_4">单价</div>
                        <div class="td td_5">数量</div>
                        <div class="td td_6">金额</div>
                        <div class="td td_7">操作</div>
                    </div>
                    <div class="tr">
                        <div class="td td_1">
                            <div class="icon-check">
                                <i class="iconfont icon-duoxuan"></i>
                            </div>
                        </div>
                        <div class="td td_2">
                            <div class="l_img">
                                <img src="../dist/images/tmp1.jpg" alt="">
                            </div>
                            <div class="r_msg">
                                <p class="name">血糖仪</p>
                                <p class="msg">每分钟脉搏/智能语音播报</p>
                            </div>

                        </div>
                        <div class="td td_3">
                            <p class="sku_txt">颜色分类：黄色；</p></div>
                        <div class="td td_4">
                            <p class="price"> <span>¥</span>699</p>
                        </div>
                        <div class="td td_5">
                            <div class="num-js">
                                <a href="#" class="sub">
                                    <i class="iconfont icon-jian"></i>
                                </a>
                                <input type="number" value="1" class="val_num" autocomplete="off">
                                <a href="#" class="add">
                                    <i class="iconfont icon-jia"></i>
                                </a>
                            </div>
                        </div>
                        <div class="td td_6">
                            <p class="price2"> <span>¥</span>699</p>
                        </div>
                        <div class="td td_7"><a href="#111" class="del_tr">删除</a></div>
                    </div>
                    <div class="tr">
                        <div class="td td_1">
                            <div class="icon-check active">
                                <i class="iconfont icon-duoxuan"></i>
                            </div>
                        </div>
                        <div class="td td_2">
                            <div class="l_img">
                                <img src="../dist/images/tmp1.jpg" alt="">
                            </div>
                            <div class="r_msg">
                                <p class="name">血糖仪</p>
                                <p class="msg">每分钟脉搏/智能语音播报</p>
                            </div>

                        </div>
                        <div class="td td_3">
                            <p class="sku_txt">颜色分类：黄色；</p></div>
                        <div class="td td_4">
                            <p class="price"> <span>¥</span>699</p>
                        </div>
                        <div class="td td_5">
                            <div class="num-js">
                                <a href="#" class="sub">
                                    <i class="iconfont icon-jian"></i>
                                </a>
                                <input type="number" value="1" class="val_num" autocomplete="off">
                                <a href="#" class="add">
                                    <i class="iconfont icon-jia"></i>
                                </a>
                            </div>
                        </div>
                        <div class="td td_6">
                            <p class="price2"> <span>¥</span>699</p>
                        </div>
                        <div class="td td_7"><a href="#111" class="del_tr">删除</a></div>
                    </div>

                     <div class="tr sx">
                        <div class="td td_1">
                            <span class="sx-icon">失效</span>
                        </div>
                        <div class="td td_2">
                            <div class="l_img">
                                <img src="../dist/images/tmp1.jpg" alt="">
                            </div>
                            <div class="r_msg">
                                <p class="name">血糖仪</p>
                                <p class="msg">每分钟脉搏/智能语音播报</p>
                            </div>

                        </div>
                        <div class="td td_3">
                            <p class="sku_txt">颜色分类：黄色；</p></div>
                        <div class="td td_4">
                            <p class="price"> <span>¥</span>699</p>
                        </div>
                        <div class="td td_5">
                            <div class="num-js">
                                <a href="#" class="sub">
                                    <i class="iconfont icon-jian"></i>
                                </a>
                                <input type="number" value="1" class="val_num" autocomplete="off" readonly>
                                <a href="#" class="add">
                                    <i class="iconfont icon-jia"></i>
                                </a>
                            </div>
                        </div>
                        <div class="td td_6">
                            <p class="price2"> <span>¥</span>699</p>
                        </div>
                        <div class="td td_7"><a href="#111" class="del_tr">删除</a></div>
                    </div>
                </div>
            </div>


            <div class="settlement-bar">

                <div class="r">
                    合计<span class="price">
                        <span>¥</span>699
                    </span>
                    <a href="./order_fill.html" class="sub_btn">
                        去结算
                    </a>
                </div>
                 <p class="msg">
                    已选商品<span class="num">1</span>件
                </p>
            </div>
        </div>
    </div>

    <div class="no_car">
        <img src="../dist/images/nonecar2.jpg" alt="">
    </div>


    <div class="pd-200"></div>

    <footer class="ft">
        <div class="warp">
            <!--<div class="logo-img">
                <img src="../dist/images/logo.png" alt="">
                <p>深圳市养悦源有限公司</p>
                <p>Copyright ©2015 fitcome.com</p>
            </div>-->
            <div class="gs-box">
                <script id="ebsgovicon" src="http://szcert.ebs.org.cn/govicon.js?id=8cd96afc-0ec2-4098-b28f-9ad7aeb714cc&width=42&height=58&type=1"
                    type="text/javascript" charset="utf-8"></script>
            </div>
            <div class="list">
                <ul>
                    <li><a href="#"><span>■</span>在线支付</a></li>
                    <li><a href="#"><span>■</span>售后服务</a></li>
                    <li><a href="#"><span>■</span>第三方配送</a></li>
                    <li><a href="#"><span>■</span>联系我们</a></li>
                </ul>
            </div>
            <div class="qr-box">
                <div class="itme-qr">
                    <div class="line"></div>
                    <div class="qr-warp">
                        <div class="qr">
                            <div>
                                <img src="../dist/images/qr1.jpg" alt="">
                                <div class="topbg"></div>
                            </div>
                            <p>下载健康云APP</p>
                        </div>
                    </div>
                </div>
                <div class="itme-qr">
                    <div class="line"></div>
                    <div class="qr-warp">
                        <div class="qr">
                            <div>
                                <img src="../dist/images/qr1.jpg" alt="">
                                <div class="topbg"></div>
                            </div>
                            <p>关注微信公众号</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </footer>



    <script src="../dist/js/lib/jquery.min.js"></script>

    <script>
    $('body').on('click','.icon-check',function(){
        var $this = $(this);
        var isActive = $this.hasClass("active");
        var isAll  = !!$(this).parents('.tit').length;
        var activeLen = $('.tr').find('.icon-check').length;
        if(isAll){
            isActive? $('.data-list').find('.icon-check').removeClass('active'):$('.data-list').find('.icon-check').addClass('active')
        }else{
            isActive ? $this.removeClass('active'): $this.addClass('active');
            if(activeLen == $('.tr').find('.active').length){
                $('.tit').find('.icon-check').addClass('active');
            }else{
                $('.tit').find('.icon-check').removeClass('active');
            }
        }

        checkActive();

    })
    function checkActive(){
         var $settlementBar = $('.settlement-bar');
         var activeLen = $('.tr').find('.active').length;
         if(activeLen !=0){
           $settlementBar.addClass('active');
           $settlementBar.find('.msg .num').text(activeLen)
        }else{
           $settlementBar.removeClass('active');
           $settlementBar.find('.msg .num').text('0')
        }
    }
    checkActive();

    </script>
</body>

</html>
